package DARCOShared.responses;

import java.io.Serializable;
import java.util.Vector;

import DARCOShared.requests.RequestBase;
import DARCOShared.requests.RequestType;
import DARCOShared.utils.Trade;

public class GetCardJourneyResponse implements ResponseBase, Serializable {
	private static final long serialVersionUID = 1L;
	
	public Vector<Trade> trades;
	public String firstOwner;
	public float registrationLatitude;
	public float registrationLongitude;
	public boolean isRegistrationGeotagged;
	
	public boolean hasError = false;
	public String errorMessage;
	
	public GetCardJourneyResponse(Vector<Trade> trades, String firstOwner, String registrationDate, float registrationLatitude, float registrationLongitude){
		this.trades = trades;
		this.firstOwner = firstOwner;
		this.registrationLatitude = registrationLatitude;
		this.registrationLongitude = registrationLongitude;
		isRegistrationGeotagged = true;
		hasError = false;
	}
	
	public GetCardJourneyResponse(Vector<Trade> trades, String firstOwner, String registrationDate){
		this(trades, firstOwner, registrationDate, -1, -1);
		isRegistrationGeotagged = false;
	}
	
	public GetCardJourneyResponse(String error){
		hasError = true;
		errorMessage = error;
	}

	@Override
	public ResponseType getResponseType() {
		return ResponseType.GetCardJourney;
	}

}
